home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form ledtest
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "LED Examples"
- ClientHeight = 5265
- ClientLeft = 1440
- ClientTop = 2145
- ClientWidth = 6855
- Height = 5610
- Left = 1410
- LinkTopic = "Form1"
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 9.287
- ScaleMode = 0 'User
- ScaleWidth = 12.092
- Top = 1830
- Width = 6915
- Begin LED LED8
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 225
- LEDColor = LEDTEST.FRX:0000
- LEDHeight = 15
- LEDIndex = 0
- LEDSep = 3
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 30
- Left = 240
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 7
- OffPictureGreen = LEDTEST.FRX:00C8
- OnPictureGreen = LEDTEST.FRX:07D2
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 16
- Top = 2790
- Value = 240
- Width = 3420
- End
- Begin LED LED2
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 3
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 360
- LEDColor = LEDTEST.FRX:09DC
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 2
- LEDStyle = 1 ' 1 - Circular
- LEDWidth = 20
- Left = 270
- MaxDecay = 0 'False
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 10
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 12
- Top = 1620
- Value = 4
- Width = 3330
- End
- Begin Timer Timer2
- Interval = 400
- Left = 90
- Top = 660
- End
- Begin LED LED10
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 450
- LEDColor = LEDTEST.FRX:0AA4
- LEDHeight = 30
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 15
- Left = 270
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = 0 'False
- NumLEDs = 15
- OffPictureGreen = LEDTEST.FRX:0B6C
- OffPictureRed = LEDTEST.FRX:0D8A
- OffPictureYellow= LEDTEST.FRX:0FA8
- OnPictureGreen = LEDTEST.FRX:11C6
- OnPictureRed = LEDTEST.FRX:13E4
- OnPictureYellow = LEDTEST.FRX:1602
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 11
- Top = 2310
- Value = 32767
- Width = 3375
- End
- Begin LED LED9
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 450
- LEDColor = LEDTEST.FRX:1820
- LEDHeight = 30
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 15
- Left = 270
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 15
- OffPictureRed = LEDTEST.FRX:18E8
- OnPictureRed = LEDTEST.FRX:1B06
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 10
- Top = 3030
- Value = 255
- Width = 3375
- End
- Begin LED LED7
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 1 ' 1 - Raised
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 630
- Index = 3
- LEDColor = LEDTEST.FRX:1D24
- LEDHeight = 30
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 30
- Left = 2760
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- OffPictureRed = LEDTEST.FRX:1DEC
- OnPictureRed = LEDTEST.FRX:1FB6
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 9
- Top = 330
- Value = 0
- Width = 630
- End
- Begin LED LED7
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 0
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 600
- Index = 2
- LEDColor = LEDTEST.FRX:2180
- LEDHeight = 40
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 40
- Left = 1950
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- OffPictureRed = LEDTEST.FRX:2248
- OnPictureRed = LEDTEST.FRX:25A6
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 8
- Top = 360
- Value = 0
- Width = 600
- End
- Begin LED LED7
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 2 ' 2 - Inset
- BevelOuter = 1 ' 1 - Raised
- BevelWidth = 2
- BorderHorizontal= 5
- BorderVertical = 5
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 630
- Index = 1
- LEDColor = LEDTEST.FRX:2904
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 1 ' 1 - Circular
- LEDWidth = 20
- Left = 1170
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 7
- Top = 330
- Value = 0
- Width = 630
- End
- Begin LED LED7
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 2 ' 2 - Inset
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderHorizontal= 5
- BorderVertical = 5
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 630
- Index = 0
- LEDColor = LEDTEST.FRX:29CC
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 20
- Left = 390
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 6
- Top = 330
- Value = 0
- Width = 630
- End
- Begin LED LED4
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 3
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 2
- DecayRate = 0
- Direction = 1 ' 1 - Backward
- Height = 360
- LEDColor = LEDTEST.FRX:2A94
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 2
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 20
- Left = 270
- MaxDecay = 0 'False
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 10
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 5
- Top = 1260
- Value = 4
- Width = 3330
- End
- Begin LED LED6
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 1 ' 1 - Raised
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 1
- BorderHorizontal= 13
- BorderVertical = 4
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 780
- LEDColor = LEDTEST.FRX:2B5C
- LEDHeight = 40
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 20
- Left = 930
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 16
- OffPictureRed = LEDTEST.FRX:2C24
- OnPictureRed = LEDTEST.FRX:2E7E
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 4
- Top = 4350
- Value = 9876
- Width = 5250
- End
- Begin Frame Frame4
- BackColor = &H00C0C0C0&
- Caption = "Max Decay Ex."
- Height = 3405
- Left = 4950
- TabIndex = 2
- Top = 60
- Width = 1695
- Begin LED LED5
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 3
- LEDColor = LEDTEST.FRX:30D8
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 1140
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 15
- Top = 300
- Value = 0
- Width = 345
- End
- Begin LED LED5
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 2
- LEDColor = LEDTEST.FRX:31A0
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 840
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 14
- Top = 300
- Value = 0
- Width = 345
- End
- Begin LED LED5
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 1
- LEDColor = LEDTEST.FRX:3268
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 540
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 13
- Top = 300
- Value = 0
- Width = 345
- End
- Begin LED LED5
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 0
- LEDColor = LEDTEST.FRX:3330
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 240
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 3
- Top = 300
- Value = 0
- Width = 345
- End
- End
- Begin Timer Timer1
- Interval = 150
- Left = 90
- Top = 180
- End
- Begin LED LED3
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 2
- BorderWidth = 0
- DecayRate = 60
- Direction = 0 ' 0 - Forward
- Height = 510
- LEDColor = LEDTEST.FRX:33F8
- LEDHeight = 26
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 23
- Left = 930
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 15
- OffPictureGreen = LEDTEST.FRX:34C0
- OffPictureRed = LEDTEST.FRX:368A
- OffPictureYellow= LEDTEST.FRX:3854
- OnPictureGreen = LEDTEST.FRX:3A1E
- OnPictureRed = LEDTEST.FRX:3BE8
- OnPictureYellow = LEDTEST.FRX:3DB2
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 1
- Top = 3720
- Value = 20
- Width = 5235
- End
- Begin LED LED1
- AutoSize = 0 'False
- BackColor = &H00C0C0C0&
- BackgroundPicture= LEDTEST.FRX:3F7C
- BevelInner = 0 ' 0 - None
- BevelOuter = 1 ' 1 - Raised
- BevelWidth = 2
- BorderHorizontal= 20
- BorderVertical = 1
- BorderWidth = 4
- DecayRate = 30
- Direction = 1 ' 1 - Backward
- Height = 3345
- LEDColor = LEDTEST.FRX:4E42
- LEDHeight = 11
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 11
- Left = 3960
- MaxDecay = 0 'False
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 15
- Orientation = 1 ' 1 - Vertical
- TabIndex = 0
- Top = 120
- Value = 7
- Width = 915
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Try clicking or sliding the LEDs"
- Height = 195
- Left = 450
- TabIndex = 17
- Top = 30
- Width = 2715
- End
- Dim theta(5) As Single
- Dim rates(5) As Single
- Sub Form_Load ()
- Randomize
- For i = 0 To 4
- theta(i) = Rnd(1) * 3.14159
- rates(i) = .2 * Rnd(1)
- Next
- End Sub
- Sub LED2_Click ()
- led4 = led2
- End Sub
- Sub LED4_Click ()
- led2 = led4
- End Sub
- Sub Timer1_Timer ()
- For i = 0 To 3
- Randomize
- led5(i) = 32 * Sin(theta(i)) ^ 2
- theta(i) = theta(i) + rates(i)
- Next
- End Sub
- Sub Timer2_Timer ()
- led10 = Rnd(1) * 32767
- End Sub
-